USE [@DATABASE]

IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_CihazMarka_isDeleted]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[CihazMarka] DROP CONSTRAINT [DF_CihazMarka_isDeleted]
END

USE [@DATABASE]
/****** Object:  Table [dbo].[CihazMarka]    Script Date: 02/11/2013 21:30:12 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[CihazMarka]') AND type in (N'U'))
DROP TABLE [dbo].[CihazMarka]

USE [@DATABASE]

/****** Object:  Table [dbo].[CihazMarka]    Script Date: 02/11/2013 21:30:12 ******/
SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[CihazMarka](
	[cmID] [int] IDENTITY(1,1) NOT NULL,
	[ChzMarka] [nvarchar](200) NULL,
	[isDeleted] [bit] NULL,
 CONSTRAINT [PK_ChzMarka] PRIMARY KEY CLUSTERED 
(
	[cmID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

ALTER TABLE [dbo].[CihazMarka] ADD  CONSTRAINT [DF_CihazMarka_isDeleted]  DEFAULT ((0)) FOR [isDeleted]